pub fn convert_base(num_str: &str, to_base: u32) -> String {
    // Find original number and base
    let idx = num_str.rfind('(').unwrap();
    let from_base: u32 = num_str[idx + 1..num_str.len() - 1].parse().unwrap();
    let mut num = u32::from_str_radix(&num_str[..idx], from_base).unwrap();
    // Convert to new base
    let mut output = String::new();
    while num > 0 {
        let rem = num % to_base;
        output.push(char::from_digit(rem, to_base).unwrap()); // In reverse order
        num /= to_base;
    }
    output.chars().rev().collect() // Reverse the output
}
